package com.ruoyi.car.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.car.mapper.OnlineCarOrdersMapper;
import com.ruoyi.car.domain.OnlineCarOrders;
import com.ruoyi.car.service.IOnlineCarOrdersService;

/**
 * 网约车订单Service业务层处理
 * 
 * @author Jolia
 * @date 2023-06-20
 */
@Service
public class OnlineCarOrdersServiceImpl implements IOnlineCarOrdersService 
{
    @Autowired
    private OnlineCarOrdersMapper onlineCarOrdersMapper;

    /**
     * 查询网约车订单
     * 
     * @param id 网约车订单主键
     * @return 网约车订单
     */
    @Override
    public OnlineCarOrders selectOnlineCarOrdersById(Integer id)
    {
        return onlineCarOrdersMapper.selectOnlineCarOrdersById(id);
    }

    /**
     * 查询网约车订单列表
     * 
     * @param onlineCarOrders 网约车订单
     * @return 网约车订单
     */
    @Override
    public List<OnlineCarOrders> selectOnlineCarOrdersList(OnlineCarOrders onlineCarOrders)
    {
        return onlineCarOrdersMapper.selectOnlineCarOrdersList(onlineCarOrders);
    }

    /**
     * 新增网约车订单
     * 
     * @param onlineCarOrders 网约车订单
     * @return 结果
     */
    @Override
    public int insertOnlineCarOrders(OnlineCarOrders onlineCarOrders)
    {
        return onlineCarOrdersMapper.insertOnlineCarOrders(onlineCarOrders);
    }

    /**
     * 修改网约车订单
     * 
     * @param onlineCarOrders 网约车订单
     * @return 结果
     */
    @Override
    public int updateOnlineCarOrders(OnlineCarOrders onlineCarOrders)
    {
        onlineCarOrders.setUpdateTime(DateUtils.getNowDate());
        return onlineCarOrdersMapper.updateOnlineCarOrders(onlineCarOrders);
    }

    /**
     * 批量删除网约车订单
     * 
     * @param ids 需要删除的网约车订单主键
     * @return 结果
     */
    @Override
    public int deleteOnlineCarOrdersByIds(Integer[] ids)
    {
        return onlineCarOrdersMapper.deleteOnlineCarOrdersByIds(ids);
    }

    /**
     * 删除网约车订单信息
     * 
     * @param id 网约车订单主键
     * @return 结果
     */
    @Override
    public int deleteOnlineCarOrdersById(Integer id)
    {
        return onlineCarOrdersMapper.deleteOnlineCarOrdersById(id);
    }
}
